#!/bin/bash
sudo echo 正在获取权限......
sudo mkdir /usr/deepin
cd /usr/deepin
echo 下载Git中，请稍后......
sudo apt-get install git
echo 下载Git完成!
sudo echo 正在clone托管在Gitee中的deepin-wine仓库......
sudo git clone https://gitee.com/wszqkzqk/deepin-wine-for-ubuntu.git
cd deepin-wine-for-ubuntu
echo 正在执行install的脚本......
./install.sh
cd /usr/deepin
sudo mkdir update
echo 下载位于mirrors.aliyun.com中的deepin-wine-qq和微信的仓库......
cd update
sudo wget http://mirrors.aliyun.com/deepin/pool/non-free/d/deepin-wine/deepin-wine_2.18-22~rc0_all.deb
sudo wget http://mirrors.aliyun.com/deepin/pool/non-free/d/deepin-wine/deepin-wine32_2.18-22~rc0_i386.deb
sudo wget http://mirrors.aliyun.com/deepin/pool/non-free/d/deepin-wine/deepin-wine32-preloader_2.18-22~rc0_i386.deb
sudo wget http://mirrors.aliyun.com/deepin/pool/non-free/d/deepin-wine-helper/deepin-wine-helper_1.2deepin8_i386.deb
sudo wget http://mirrors.aliyun.com/deepin/pool/non-free/d/deepin-wine-plugin/deepin-wine-plugin_1.0deepin2_amd64.deb
sudo wget http://mirrors.aliyun.com/deepin/pool/non-free/d/deepin-wine-plugin-virtual/deepin-wine-plugin-virtual_1.0deepin3_all.deb
sudo wget http://mirrors.aliyun.com/deepin/pool/non-free/d/deepin-wine-uninstaller/deepin-wine-uninstaller_0.1deepin2_i386.deb
sudo wget http://mirrors.aliyun.com/deepin/pool/non-free/u/udis86/udis86_1.72-2_i386.deb
sudo wget http://mirrors.aliyun.com/deepin/pool/non-free/d/deepin-wine/deepin-fonts-wine_2.18-22~rc0_all.deb
sudo wget http://mirrors.aliyun.com/deepin/pool/non-free/d/deepin-wine/deepin-libwine_2.18-22~rc0_i386.deb
sudo wget https://mirrors.aliyun.com/deepin/pool/main/libj/libjpeg-turbo/libjpeg62-turbo_1.5.1-2_amd64.deb
sudo wget https://mirrors.aliyun.com/deepin/pool/main/libj/libjpeg-turbo/libjpeg62-turbo_1.5.1-2_i386.deb
sudo wget http://mirrors.aliyun.com/deepin/pool/non-free/d/deepin.com.qq.im/deepin.com.qq.im_9.1.8deepin0_i386.deb
sudo wget http://mirrors.aliyun.com/deepin/pool/non-free/d/deepin.com.wechat/deepin.com.wechat_2.6.8.65deepin0_i386.deb
scho 安装中......
sudo dpkg -i *.deb
sudo apt-get install -f
sudo rm -rf /usr/deepin
clear
echo deepin-wine QQ和微信已经安装完毕！
echo version：QQ 9.1.8     微信2.6.8
echo 如果脚本在执行过程中出现任何问题,请联系开发者(qygwhk@163.com)并指明问题所在,便于修复！
echo 感谢https://gitee.com/wszqkzqk/deepin-wine-for-ubuntu 和 https://bbs.deepin.org/forum.php?mod=viewthread&tid=183464 提供的解决方案。
sleep 2
exit
